package Content;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


public class Conference {
	private ProgramChair programchair;
	
	List<SubProgramChair> subChair;
	
	List<Reviewer> reviewers;

	ProgramChair name;
	int deadlineMonth;
	int deadlineDay;
	int deadlineYear;
	Date deadline;
	ArrayList<Paper> paperList = new ArrayList<Paper>();
	ArrayList<Paper> acceptedPaperList = new ArrayList<Paper>();
	
	@SuppressWarnings("deprecation")
	public Conference(String name, int deadlineMonth, int deadlineDay, int deadlineYear, 
			ProgramChair programChair){
		
		this.name = programChair;
	//	programchair = new ProgramChair(programChairName);
	//	subchair = new SubprogramChair(subprogramChairName);
//		deadline.setMonth(deadlineMonth);
//		deadline.setDate(deadlineDay);
//		deadline.setYear(deadlineYear);
		subChair = new ArrayList<SubProgramChair>();
		reviewers = new ArrayList<Reviewer>();
		
	}
	
	public boolean isPastDueDate(){
		Date todayDate = new Date();
		return deadline.compareTo(todayDate) < 0;
	}
	
//	protected int addReviewer(Reviewer r){
//		if(reviewerList.contains(r)){
//			return 0;
//		}
//		reviewerList.add(r);
//		return 1;
//	}
	
	protected int addAcceptedPaper(Paper paper){
		if(acceptedPaperList.contains(paper)){
			return 0;
		}
		acceptedPaperList.add(paper);
		return 1;		
	}
	
	public ArrayList<Paper> getAcceptedPapers(){
		return acceptedPaperList;
	}
	
	protected int addPaper(Paper paper){
		if(paperList.contains(paper)){
			return 0;
		}
		paperList.add(paper);
		return 1;
	}
	
	public ArrayList<Paper> getPapers(){
		return paperList;
	}	
	
	public void assignSubChair(SubProgramChair the_subchair) {
		//subchair = the_subchair;
	}
}